home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / std / c++ / 30 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  1.5 KB

  1. Path: in2.uu.net!bounce-back
  2. Date: 10 Jan 96 23:20:34 GMT
  3. Approved: fjh@cs.mu.oz.au
  4. From: clamage@Eng.Sun.COM (Steve Clamage)
  5. Newsgroups: comp.std.c++
  6. Subject: Re: ambiguous or not ?
  7. X-Original-Date: 10 Jan 1996 22:24:53 GMT
  8. Organization: Sun Microsystems Inc.
  9. Message-ID: <4d1ebl$kn9@engnews1.Eng.Sun.COM>
  10. References: <199601101956.AA04691@hercules.iassf.easams.com.au>
  11. Reply-To: clamage@Eng.Sun.COM
  12. X-Auth: PGPMoose V1.1 PGP comp.std.c++
  13.     iQBFAgUBMPRKn+EDnX0m9pzZAQG9pAGAkb/CKtSvYiSBpqIP16cbdzqIOymQd7xX
  14.     TPitMMnjsIBuOIaLeDwdTe+aTNauuKrh
  15.     =XOe+
  16.  
  17. In article AA04691@hercules.iassf.easams.com.au, rjl@iassf.easams.com.au
  18. writes:
  19. >
  20. >Surely it is ill-formed, since char is implementation defined as either
  21. >unsigned char or signed char.
  22. >:     S( char ) {
  23. >...
  24. >:     S( unsigned char ) {
  25. >
  26. >Which means that on some platforms this means something and on others
  27. >it is a dupplicate definition.
  28.  
  29. No. Type "char" has the same repesentation as either "signed char" or
  30. "unsigned char", but is a distinct type. You can overload on all three
  31. types:
  32.     int foo(char) { ... }
  33.     int foo(signed char) { ... }
  34.     int foo(unsigned char) { ... }
  35.  
  36. Similarly, type int often has the same representation as either type
  37. short or type long, but it is a distinct type.
  38.  
  39. ---
  40. Steve Clamage, stephen.clamage@eng.sun.com
  41. ---
  42. [ comp.std.c++ is moderated.  Submission address: std-c++@ncar.ucar.edu.
  43.   Contact address: std-c++-request@ncar.ucar.edu.  The moderation policy
  44.   is summarized in http://dogbert.lbl.gov/~matt/std-c++/policy.html. ]
  45.